
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>gitbook · 加解密常见问题</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="华夏银行综合支付项目组">
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-prism/prism.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-insert-logo/plugin.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    
    <link rel="prev" href="./" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.2" data-path="gitbook.html">
            
                <a href="gitbook.html">
            
                    
                    gitbook
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >gitbook</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h2 id="&#x5B89;&#x88C5;">&#x5B89;&#x88C5;</h2>
<pre class="language-"><code class="lang-bash"><span class="token function">npm</span> config <span class="token builtin class-name">set</span> registry http://registry.npm.taobao.org/
<span class="token function">npm</span> <span class="token function">install</span> gitbook-cli -g
</code></pre>
<h2 id="&#x521D;&#x59CB;&#x5316;book">&#x521D;&#x59CB;&#x5316;book</h2>
<pre class="language-"><code class="lang-bash"><span class="token comment"># manjaro @ manjaro in ~/Documents/ebook/gitbook [10:45:00] </span>
$ gitbook init
Installing GitBook <span class="token number">3.2</span>.3
/home/manjaro/opt/npm/npm_global/lib/node_modules/gitbook-cli/node_modules/npm/node_modules/graceful-fs/polyfills.js:287
      <span class="token keyword">if</span> <span class="token punctuation">(</span>cb<span class="token punctuation">)</span> cb.apply<span class="token punctuation">(</span>this, arguments<span class="token punctuation">)</span>
                 ^

TypeError: cb.apply is not a <span class="token keyword">function</span>
    at /home/manjaro/opt/npm/npm_global/lib/node_modules/gitbook-cli/node_modules/npm/node_modules/graceful-fs/polyfills.js:287:18
    at FSReqCallback.oncomplete <span class="token punctuation">(</span>node:fs:193:5<span class="token punctuation">)</span>
</code></pre>
<p><img src="https://gitee.com/zzylml/picgo/raw/master/image-20201202104722184.png" alt="image-20201202104722184"></p>
<h3 id="&#x6CE8;&#x91CA;&#x6389;&#x8FD9;&#x4E09;&#x884C;">&#x6CE8;&#x91CA;&#x6389;&#x8FD9;&#x4E09;&#x884C;</h3>
<pre class="language-"><code>vi /home/manjaro/opt/npm/npm_global/lib/node_modules/gitbook-cli/node_modules/npm/node_modules/graceful-fs/polyfills.js
</code></pre><p><img src="https://gitee.com/zzylml/picgo/raw/master/image-20201202105240855.png" alt="image-20201202105240855"></p>
<h3 id="&#x5207;&#x6362;node&#x7248;&#x672C;&#xFF08;&#x9700;&#x8981;&#x5341;&#x5206;&#x949F;&#x5DE6;&#x53F3;&#xFF0C;&#x8010;&#x5FC3;&#x7B49;&#x5F85;&#xFF09;">&#x5207;&#x6362;node&#x7248;&#x672C;&#xFF08;&#x9700;&#x8981;&#x5341;&#x5206;&#x949F;&#x5DE6;&#x53F3;&#xFF0C;&#x8010;&#x5FC3;&#x7B49;&#x5F85;&#xFF09;</h3>
<pre class="language-"><code class="lang-bash"><span class="token comment"># manjaro @ manjaro in ~/Documents/ebook/gitbook [11:36:01]</span>
$ gitbook init
warn: no summary <span class="token function">file</span> <span class="token keyword">in</span> this book 
info: create SUMMARY.md 

TypeError <span class="token punctuation">[</span>ERR_INVALID_ARG_TYPE<span class="token punctuation">]</span>: The <span class="token string">&quot;data&quot;</span> argument must be of <span class="token builtin class-name">type</span> string or an instance of Buffer, TypedArray, or DataView. Received an instance of Promise
</code></pre>
<p><img src="https://gitee.com/zzylml/picgo/raw/master/image-20201202120614044.png" alt="image-20201202120614044"></p>
<h4 id="&#x5B89;&#x88C5;nvm">&#x5B89;&#x88C5;nvm</h4>
<pre class="language-"><code>curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash

&#x5C06;&#x5176;&#x590D;&#x5236;&#x5230;.zshrc
export NVM_DIR=&quot;$HOME/.nvm&quot;
[ -s &quot;$NVM_DIR/nvm.sh&quot; ] &amp;&amp; \. &quot;$NVM_DIR/nvm.sh&quot;  # This loads nvm
[ -s &quot;$NVM_DIR/bash_completion&quot; ] &amp;&amp; \. &quot;$NVM_DIR/bash_completion&quot;  # This loads nvm bash_completion
</code></pre><h4 id="nvm&#x5E38;&#x7528;&#x547D;&#x4EE4;">nvm&#x5E38;&#x7528;&#x547D;&#x4EE4;</h4>
<pre class="language-"><code>nvm // &#x4F1A;&#x63D0;&#x793A;nvw&#x4E0B;&#x7684;&#x76F8;&#x5173;&#x547D;&#x4EE4;
nvm ls // &#x67E5;&#x770B;&#x5DF2;&#x5B89;&#x88C5;node&#x7248;&#x672C;
nvm install vXX // &#x5B89;&#x88C5;&#x5BF9;&#x5E94;vXX&#x7248;&#x672C;&#x7684;node
nvm uninstall&gt; vXX // &#x5378;&#x8F7D;&#x5BF9;&#x5E94;vXX&#x7248;&#x672C;&#x7684;node
nvm use xxx // &#x9009;&#x62E9;&#x4F7F;&#x7528;XXX&#x7248;&#x672C;
</code></pre><h4 id="&#x5B89;&#x88C5;&#x6307;&#x5B9A;&#x7248;&#x672C;&#x7684;node">&#x5B89;&#x88C5;&#x6307;&#x5B9A;&#x7248;&#x672C;&#x7684;node</h4>
<pre class="language-"><code class="lang-bash"><span class="token comment"># manjaro @ manjaro in ~/Documents/ebook/gitbook [11:59:54] </span>
$ nvm <span class="token function">install</span> v12.16.3
Downloading and installing node v12.16.3<span class="token punctuation">..</span>.
Downloading https://nodejs.org/dist/v12.16.3/node-v12.16.3-linux-x64.tar.xz<span class="token punctuation">..</span>.
<span class="token comment">################################################################################################################################## 100.0%</span>
Computing checksum with sha256sum
Checksums matched<span class="token operator">!</span>
Your user&#x2019;s .npmrc <span class="token function">file</span> <span class="token punctuation">(</span><span class="token variable">${<span class="token environment constant">HOME</span>}</span>/.npmrc<span class="token punctuation">)</span>
has a <span class="token variable"><span class="token variable">`</span>globalconfig<span class="token variable">`</span></span> and/or a <span class="token variable"><span class="token variable">`</span>prefix<span class="token variable">`</span></span> setting, <span class="token function">which</span> are incompatible with nvm.
Run <span class="token variable"><span class="token variable">`</span>nvm use --delete-prefix v12.16.3<span class="token variable">`</span></span> to <span class="token builtin class-name">unset</span> it.

<span class="token comment"># manjaro @ manjaro in ~/Documents/ebook/gitbook [12:02:30] C:11</span>
$ node -v 
v12.16.3
</code></pre>
<p><img src="https://gitee.com/zzylml/picgo/raw/master/image-20201202121116814.png" alt="image-20201202121116814"></p>
<h2 id="&#x53D1;&#x5E03;&#x5230;&#x6D4F;&#x89C8;&#x5668;">&#x53D1;&#x5E03;&#x5230;&#x6D4F;&#x89C8;&#x5668;</h2>
<pre class="language-"><code class="lang-bash"><span class="token comment"># manjaro @ manjaro in ~/Documents/ebook/gitbook [12:05:16] </span>
$ gitbook serve      
Live reload server started on port: <span class="token number">35729</span>
Press CTRL+C to quit <span class="token punctuation">..</span>.

info: <span class="token number">7</span> plugins are installed 
info: loading plugin <span class="token string">&quot;livereload&quot;</span><span class="token punctuation">..</span>. OK 
info: loading plugin <span class="token string">&quot;highlight&quot;</span><span class="token punctuation">..</span>. OK 
info: loading plugin <span class="token string">&quot;search&quot;</span><span class="token punctuation">..</span>. OK 
info: loading plugin <span class="token string">&quot;lunr&quot;</span><span class="token punctuation">..</span>. OK 
info: loading plugin <span class="token string">&quot;sharing&quot;</span><span class="token punctuation">..</span>. OK 
info: loading plugin <span class="token string">&quot;fontsettings&quot;</span><span class="token punctuation">..</span>. OK 
info: loading plugin <span class="token string">&quot;theme-default&quot;</span><span class="token punctuation">..</span>. OK 
info: found <span class="token number">1</span> pages 
info: found <span class="token number">0</span> asset files 
info: <span class="token operator">&gt;&gt;</span> generation finished with success <span class="token keyword">in</span> <span class="token number">1</span>.0s <span class="token operator">!</span> 

Starting server <span class="token punctuation">..</span>.
Serving book on http://localhost:4000
</code></pre>
<footer class="page-footer"><span class="copyright">&#x5317;&#x4EAC;&#x5F00;&#x79D1;&#x552F;&#x8BC6;&#x516C;&#x53F8;&#x7248;&#x6743;&#x6240;&#x6709; all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">&#x8BE5;&#x6587;&#x7AE0;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2020-12-02 12:27:20
</span></footer>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="./" class="navigation navigation-prev navigation-unique" aria-label="Previous page: Introduction">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"gitbook","level":"1.2","depth":1,"previous":{"title":"Introduction","level":"1.1","depth":1,"path":"README.md","ref":"README.md","articles":[]},"dir":"ltr"},"config":{"plugins":["hide-element","back-to-top-button","prism","copy-code-button","chapter-fold","code","expandable-chapters","expandable-chapters-small","splitter","custom-favicon","insert-logo","tbfed-pagefooter","-sharing","sharing-plus"],"styles":{"website":"./styles/website.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"北京开科唯识公司版权所有","modify_label":"该文章修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"chapter-fold":{},"prism":{},"splitter":{},"search":{},"sharing-plus":{"qq":false,"all":["facebook","google","twitter","instapaper","linkedin","pocket","stumbleupon"],"douban":false,"facebook":true,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":true,"messenger":false,"line":false,"vk":false,"pocket":true,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"code":{"copyButtons":true},"hide-element":{"elements":[".gitbook-link"]},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"favicon":"./images/favicon.ico","back-to-top-button":{},"custom-favicon":{},"expandable-chapters-small":{},"copy-code-button":{},"sharing":{"twitter":false,"facebook":false,"google":false},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"insert-logo":{"style":"background: none; max-height: 60px; min-height: 50px","url":"./images/logo.png"},"expandable-chapters":{}},"theme":"default","author":"华夏银行综合支付项目组","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"加解密常见问题","language":"zh-hans","gitbook":"*","description":"常见问题汇总以及解决方法"},"file":{"path":"gitbook.md","mtime":"2020-12-02T04:27:20.048Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-12-03T01:31:18.607Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-hide-element/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-copy-code-button/toggle.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-insert-logo/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing-plus/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

